package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbProductoEsp generated by hbm2java
 */
@Entity
@Table(name = "TB_PRODUCTO_ESP", schema = "CATALOGOS")
public class TbProductoEsp implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private TbProductoEspId id;
	private TbMedidasLiq tbMedidasLiq;
	private String dmarca;
	private Double vgradoAlcohol;
	private String cusuario;
	private Date fhingreso;
	private Date fhmodifica;
	private Integer bstatus;

	public TbProductoEsp() {
	}

	public TbProductoEsp(TbProductoEspId id, TbMedidasLiq tbMedidasLiq,
			String cusuario, Date fhingreso, Date fhmodifica, Integer bstatus) {
		this.id = id;
		this.tbMedidasLiq = tbMedidasLiq;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodifica = fhmodifica;
		this.bstatus = bstatus;
	}

	public TbProductoEsp(TbProductoEspId id, TbMedidasLiq tbMedidasLiq,
			String dmarca, Double vgradoAlcohol, String cusuario,
			Date fhingreso, Date fhmodifica, Integer bstatus) {
		this.id = id;
		this.tbMedidasLiq = tbMedidasLiq;
		this.dmarca = dmarca;
		this.vgradoAlcohol = vgradoAlcohol;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodifica = fhmodifica;
		this.bstatus = bstatus;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "icodigo", column = @Column(name = "I_CODIGO", nullable = false, precision = 10, scale = 0)),
			@AttributeOverride(name = "nit", column = @Column(name = "NIT", nullable = false, length = 14)) })
	public TbProductoEspId getId() {
		return this.id;
	}

	public void setId(TbProductoEspId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_MEDIDA", nullable = false)
	public TbMedidasLiq getTbMedidasLiq() {
		return this.tbMedidasLiq;
	}

	public void setTbMedidasLiq(TbMedidasLiq tbMedidasLiq) {
		this.tbMedidasLiq = tbMedidasLiq;
	}

	@Column(name = "D_MARCA", length = 100)
	public String getDmarca() {
		return this.dmarca;
	}

	public void setDmarca(String dmarca) {
		this.dmarca = dmarca;
	}

	@Column(name = "V_GRADO_ALCOHOL", precision = 5)
	public Double getVgradoAlcohol() {
		return this.vgradoAlcohol;
	}

	public void setVgradoAlcohol(Double vgradoAlcohol) {
		this.vgradoAlcohol = vgradoAlcohol;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_MODIFICA", nullable = false, length = 7)
	public Date getFhmodifica() {
		return this.fhmodifica;
	}

	public void setFhmodifica(Date fhmodifica) {
		this.fhmodifica = fhmodifica;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Integer getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Integer bstatus) {
		this.bstatus = bstatus;
	}

}
